home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Source.bin / BorderPanelBeanInfo.java < prev    next >
Text File  |  1998-08-21  |  22KB  |  572 lines

  1. package symantec.itools.awt;
  2.  
  3. import java.beans.*;
  4. import symantec.itools.beans.*;
  5. import java.util.ResourceBundle;
  6.  
  7. //  09/07/97    LAB    Fixed misspelling of descriptions.
  8. //    09/21/97    RKM    Fixed bug in "getLabelColor" connection
  9. //    09/24/97    RKM    Fixed bug in "getBorderColor" connection
  10. //  08/19/98    LAB    Moved to GroupAWTAdditions folder.
  11.  
  12. /**
  13.  * BeanInfo for BorderPanel.
  14.  */
  15. public class BorderPanelBeanInfo extends SimpleBeanInfo {
  16.  
  17.     /**
  18.      * Constructs a BorderPanelBeanInfo object.
  19.      */
  20.     public BorderPanelBeanInfo() {
  21.     }
  22.  
  23.     /**
  24.      * Gets a BeanInfo for the superclass of this bean.
  25.      * @return BeanInfo[] containing this bean's superclass BeanInfo
  26.      */
  27.     public BeanInfo[] getAdditionalBeanInfo() {
  28.         try {
  29.             BeanInfo[] bi = new BeanInfo[1];
  30.             bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
  31.             return bi;
  32.         }
  33.         catch (IntrospectionException e) { throw new Error(e.toString());}
  34.     }
  35.  
  36.     /**
  37.      * Gets the SymantecBeanDescriptor for this bean.
  38.      * @return an object of type SymantecBeanDescriptor
  39.      * @see symantec.itools.beans.SymantecBeanDescriptor
  40.      */
  41.     public BeanDescriptor getBeanDescriptor() {
  42.         ResourceBundle group = ResourceBundle.getBundle("symantec.itools.resources.GroupBundle");
  43.         String s=group.getString("GroupAWTAdditions"); 
  44.  
  45.         SymantecBeanDescriptor bd = new SymantecBeanDescriptor(beanClass);
  46.         bd.setFolder(s);
  47.         bd.setToolbar(s);
  48.         bd.setWinHelp("0x123B5");
  49.  
  50.         ResourceBundle conn = ResourceBundle.getBundle("symantec.itools.resources.ConnBundle");
  51.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  52.                                                 "%name%.ALIGN_LEFT",
  53.                                                 conn.getString("ALIGN_LEFT")));
  54.  
  55.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  56.                                                 "%name%.ALIGN_CENTERED",
  57.                                                 conn.getString("ALIGN_CENTERED")));
  58.  
  59.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  60.                                                 "%name%.ALIGN_RIGHT",
  61.                                                 conn.getString("ALIGN_RIGHT")));
  62.  
  63.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  64.                                                 "%name%.BEVEL_LOWERED",
  65.                                                 conn.getString("BEVEL_LOWERED")));
  66.  
  67.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  68.                                                 "%name%.BEVEL_RAISED",
  69.                                                 conn.getString("BEVEL_RAISED")));
  70.  
  71.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  72.                                                 "%name%.BEVEL_LINE",
  73.                                                 conn.getString("BEVEL_LINE")));
  74.  
  75.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  76.                                                 "%name%.BEVEL_NONE",
  77.                                                 conn.getString("BEVEL_NONE")));
  78.  
  79.  
  80.         return (BeanDescriptor) bd;
  81.     }
  82.  
  83.     /**
  84.      * Gets an image that may be used to visually represent this bean
  85.      * (in the toolbar, on a form, etc).
  86.      * @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
  87.      * BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
  88.      * @return an image for this bean, always color even if requested monochrome
  89.      * @see BeanInfo#ICON_MONO_16x16
  90.      * @see BeanInfo#ICON_COLOR_16x16
  91.      * @see BeanInfo#ICON_MONO_32x32
  92.      * @see BeanInfo#ICON_COLOR_32x32
  93.      */
  94.     public java.awt.Image getIcon(int iconKind) {
  95.         if (iconKind == BeanInfo.ICON_MONO_16x16 ||
  96.             iconKind == BeanInfo.ICON_COLOR_16x16) {
  97.             java.awt.Image img = loadImage("BorderPanelC16.gif");
  98.             return img;
  99.         }
  100.  
  101.         if (iconKind == BeanInfo.ICON_MONO_32x32 ||
  102.             iconKind == BeanInfo.ICON_COLOR_32x32) {
  103.             java.awt.Image img = loadImage("BorderPanelC32.gif");
  104.             return img;
  105.         }
  106.  
  107.         return null;
  108.     }
  109.  
  110.     /**
  111.      * Gets an array of descriptions of the methods used for "connections" by
  112.      * Visual CafΘ's Interaction Wizard.
  113.      * Included in each method description is a CONNECTIONS ConnectionDescriptor.
  114.      * @return method descriptions for this bean
  115.      * @see symantec.itools.beans.ConnectionDescriptor#CONNECTIONS
  116.      */
  117.     public MethodDescriptor[] getMethodDescriptors() {
  118.         Class[] args;
  119.         ConnectionDescriptor connection;
  120.         java.util.Vector connections;
  121.         java.util.Vector md = new java.util.Vector();
  122.         ResourceBundle conn = ResourceBundle.getBundle("symantec.itools.resources.ConnBundle");
  123.  
  124.         try{
  125.             args = null;
  126.             MethodDescriptor getBevelStyle = new MethodDescriptor(beanClass.getMethod("getBevelStyle", args));
  127.  
  128.             connections = new java.util.Vector();
  129.             connection = new ConnectionDescriptor("output", "int", "",
  130.                                     "%name%.getBevelStyle()",
  131.                                     conn.getString("getBevelStyle"));
  132.             connections.addElement(connection);
  133.  
  134.             getBevelStyle.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  135.             md.addElement(getBevelStyle);
  136.         } catch (Exception e) { throw new Error("getBevelStyle:: " + e.toString()); }
  137.  
  138.         try{
  139.             args = null;
  140.             MethodDescriptor getIPadTop = new MethodDescriptor(beanClass.getMethod("getIPadTop", args));
  141.  
  142.             connections = new java.util.Vector();
  143.             connection = new ConnectionDescriptor("output", "int", "",
  144.                                     "%name%.getIPadTop()",
  145.                                     conn.getString("getIPadTop"));
  146.             connections.addElement(connection);
  147.  
  148.             getIPadTop.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  149.             md.addElement(getIPadTop);
  150.         } catch (Exception e) { throw new Error("getIPadTop:: " + e.toString()); }
  151.  
  152.         try{
  153.             args = null;
  154.             MethodDescriptor getIPadBottom = new MethodDescriptor(beanClass.getMethod("getIPadBottom", args));
  155.  
  156.             connections = new java.util.Vector();
  157.             connection = new ConnectionDescriptor("output", "int", "",
  158.                                     "%name%.getIPadBottom()",
  159.                                     conn.getString("getIPadBottom"));
  160.  
  161.             getIPadBottom.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  162.             md.addElement(getIPadBottom);
  163.         } catch (Exception e) { throw new Error("getIPadBottom:: " + e.toString()); }
  164.  
  165.         try{
  166.             args = null;
  167.             MethodDescriptor getPaddingLeft = new MethodDescriptor(beanClass.getMethod("getPaddingLeft", args));
  168.  
  169.             connections = new java.util.Vector();
  170.             connection = new ConnectionDescriptor("output", "int", "",
  171.                                     "%name%.getPaddingLeft()",
  172.                                     conn.getString("getPaddingLeft"));
  173.             connections.addElement(connection);
  174.  
  175.             getPaddingLeft.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  176.             md.addElement(getPaddingLeft);
  177.         } catch (Exception e) { throw new Error("getPaddingLeft:: " + e.toString()); }
  178.  
  179.         try{
  180.             args = new Class[1];
  181.             args[0] = java.lang.Integer.TYPE ;
  182.             MethodDescriptor setIPadSides = new MethodDescriptor(beanClass.getMethod("setIPadSides", args));
  183.  
  184.             connections = new java.util.Vector();
  185.             connection = new ConnectionDescriptor("input", "int", "",
  186.                                     "%name%.setIPadSides(%arg%);",
  187.                                     conn.getString("setIPadSides"));
  188.             connections.addElement(connection);
  189.  
  190.             setIPadSides.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  191.             md.addElement(setIPadSides);
  192.         } catch (Exception e) { throw new Error("setIPadSides:: " + e.toString()); }
  193.  
  194.         try{
  195.             args = new Class[1];
  196.             args[0] = java.lang.Integer.TYPE ;
  197.             MethodDescriptor setPaddingLeft = new MethodDescriptor(beanClass.getMethod("setPaddingLeft", args));
  198.  
  199.             connections = new java.util.Vector();
  200.             connection = new ConnectionDescriptor("input", "int", "",
  201.                                     "%name%.setPaddingLeft(%arg%);",
  202.                                     conn.getString("setPaddingLeft"));
  203.             connections.addElement(connection);
  204.  
  205.             setPaddingLeft.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  206.             md.addElement(setPaddingLeft);
  207.         } catch (Exception e) { throw new Error("setPaddingLeft:: " + e.toString()); }
  208.  
  209.         try{
  210.             args = null;
  211.             MethodDescriptor getPaddingRight = new MethodDescriptor(beanClass.getMethod("getPaddingRight", args));
  212.  
  213.             connections = new java.util.Vector();
  214.             connection = new ConnectionDescriptor("output", "int", "",
  215.                                     "%name%.getPaddingRight()",
  216.                                     conn.getString("getPaddingRight"));
  217.             connections.addElement(connection);
  218.  
  219.             getPaddingRight.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  220.             md.addElement(getPaddingRight);
  221.         } catch (Exception e) { throw new Error("getPaddingRight:: " + e.toString()); }
  222.  
  223.         try{
  224.             args = new Class[1];
  225.             args[0] = java.lang.Integer.TYPE ;
  226.             MethodDescriptor setPaddingRight = new MethodDescriptor(beanClass.getMethod("setPaddingRight", args));
  227.  
  228.             connections = new java.util.Vector();
  229.             connection = new ConnectionDescriptor("input", "int", "",
  230.                                     "%name%.setPaddingRight(%arg%);",
  231.                                     conn.getString("setPaddingRight"));
  232.             connections.addElement(connection);
  233.  
  234.             setPaddingRight.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  235.             md.addElement(setPaddingRight);
  236.         } catch (Exception e) { throw new Error("setPaddingRight:: " + e.toString()); }
  237.  
  238.         try{
  239.             args = null;
  240.             MethodDescriptor getIPadSides = new MethodDescriptor(beanClass.getMethod("getIPadSides", args));
  241.  
  242.             connections = new java.util.Vector();
  243.             connection = new ConnectionDescriptor("output", "int", "",
  244.                                     "%name%.getIPadSides()",
  245.                                     conn.getString("getIPadSides"));
  246.             connections.addElement(connection);
  247.  
  248.             getIPadSides.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  249.             md.addElement(getIPadSides);
  250.         } catch (Exception e) { throw new Error("getIPadSides:: " + e.toString()); }
  251.  
  252.         try{
  253.             args = new Class[1];
  254.             args[0] = java.awt.Color.class ;
  255.             MethodDescriptor setLabelColor = new MethodDescriptor(beanClass.getMethod("setLabelColor", args));
  256.  
  257.             connections = new java.util.Vector();
  258.             connection = new ConnectionDescriptor("input", "Color", "",
  259.                                     "%name%.setLabelColor(%arg%);",
  260.                                     conn.getString("setLabelColor"));
  261.             connections.addElement(connection);
  262.  
  263.             setLabelColor.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  264.             md.addElement(setLabelColor);
  265.         } catch (Exception e) { throw new Error("setLabelColor:: " + e.toString()); }
  266.  
  267.         try{
  268.             args = new Class[1];
  269.             args[0] = java.lang.Integer.TYPE ;
  270.             MethodDescriptor setPaddingTop = new MethodDescriptor(beanClass.getMethod("setPaddingTop", args));
  271.  
  272.             connections = new java.util.Vector();
  273.             connection = new ConnectionDescriptor("input", "int", "",
  274.                                     "%name%.setPaddingTop(%arg%);",
  275.                                     conn.getString("setPaddingTop"));
  276.             connections.addElement(connection);
  277.  
  278.             setPaddingTop.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  279.             md.addElement(setPaddingTop);
  280.         } catch (Exception e) { throw new Error("setPaddingTop:: " + e.toString()); }
  281.  
  282.         try{
  283.             args = null;
  284.             MethodDescriptor getPaddingBottom = new MethodDescriptor(beanClass.getMethod("getPaddingBottom", args));
  285.  
  286.             connections = new java.util.Vector();
  287.             connection = new ConnectionDescriptor("output", "int", "",
  288.                                     "%name%.getPaddingBottom()",
  289.                                     conn.getString("getPaddingBottom"));
  290.             connections.addElement(connection);
  291.  
  292.             getPaddingBottom.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  293.             md.addElement(getPaddingBottom);
  294.         } catch (Exception e) { throw new Error("getPaddingBottom:: " + e.toString()); }
  295.  
  296.         try{
  297.             args = new Class[1];
  298.             args[0] = java.lang.String.class ;
  299.             MethodDescriptor setLabel = new MethodDescriptor(beanClass.getMethod("setLabel", args));
  300.  
  301.             connections = new java.util.Vector();
  302.             connection = new ConnectionDescriptor("input", "String", "",
  303.                                     "%name%.setLabel(%arg%);",
  304.                                     conn.getString("setLabel"));
  305.             connections.addElement(connection);
  306.  
  307.             setLabel.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  308.             md.addElement(setLabel);
  309.         } catch (Exception e) { throw new Error("setLabel:: " + e.toString()); }
  310.  
  311.         try{
  312.             args = new Class[1];
  313.             args[0] = java.lang.Integer.TYPE ;
  314.             MethodDescriptor setAlignStyle = new MethodDescriptor(beanClass.getMethod("setAlignStyle", args));
  315.  
  316.             connections = new java.util.Vector();
  317.             connection = new ConnectionDescriptor("input", "int", "",
  318.                                     "%name%.setAlignStyle(%arg%);",
  319.                                     conn.getString("setAlignStyle"));
  320.             connections.addElement(connection);
  321.  
  322.             setAlignStyle.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  323.             md.addElement(setAlignStyle);
  324.         } catch (Exception e) { throw new Error("setAlignStyle:: " + e.toString()); }
  325.  
  326.         try{
  327.             args = null;
  328.             MethodDescriptor getBorderColor = new MethodDescriptor(beanClass.getMethod("getBorderColor", args));
  329.  
  330.             connections = new java.util.Vector();
  331.             connection = new ConnectionDescriptor("output", "Color", "",
  332.                                     "%name%.getBorderColor()",
  333.                                     conn.getString("getBorderColor"));
  334.             connections.addElement(connection);
  335.  
  336.             getBorderColor.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  337.             md.addElement(getBorderColor);
  338.         } catch (Exception e) { throw new Error("getBorderColor:: " + e.toString()); }
  339.  
  340.         try{
  341.             args = new Class[1];
  342.             args[0] = java.lang.Integer.TYPE ;
  343.             MethodDescriptor setIPadTop = new MethodDescriptor(beanClass.getMethod("setIPadTop", args));
  344.  
  345.             connections = new java.util.Vector();
  346.             connection = new ConnectionDescriptor("input", "int", "",
  347.                                     "%name%.setIPadTop(%arg%);",
  348.                                     conn.getString("setIPadTop"));
  349.             connections.addElement(connection);
  350.  
  351.             setIPadTop.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  352.             md.addElement(setIPadTop);
  353.         } catch (Exception e) { throw new Error("setIPadTop:: " + e.toString()); }
  354.  
  355.         try{
  356.             args = null;
  357.             MethodDescriptor getLabel = new MethodDescriptor(beanClass.getMethod("getLabel", args));
  358.  
  359.             connections = new java.util.Vector();
  360.             connection = new ConnectionDescriptor("output", "String", "",
  361.                                     "%name%.getLabel()",
  362.                                     conn.getString("getLabel"));
  363.             connections.addElement(connection);
  364.  
  365.             getLabel.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  366.             md.addElement(getLabel);
  367.         } catch (Exception e) { throw new Error("getLabel:: " + e.toString()); }
  368.  
  369.         try{
  370.             args = new Class[1];
  371.             args[0] = java.awt.Color.class ;
  372.             MethodDescriptor setBorderColor = new MethodDescriptor(beanClass.getMethod("setBorderColor", args));
  373.  
  374.             connections = new java.util.Vector();
  375.             connection = new ConnectionDescriptor("input", "Color", "",
  376.                                     "%name%.setBorderColor(%arg%);",
  377.                                     conn.getString("setBorderColor"));
  378.             connections.addElement(connection);
  379.  
  380.             setBorderColor.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  381.             md.addElement(setBorderColor);
  382.         } catch (Exception e) { throw new Error("setBorderColor:: " + e.toString()); }
  383.  
  384.         try{
  385.             args = new Class[1];
  386.             args[0] = java.lang.Integer.TYPE ;
  387.             MethodDescriptor setBevelStyle = new MethodDescriptor(beanClass.getMethod("setBevelStyle", args));
  388.  
  389.             connections = new java.util.Vector();
  390.             connection = new ConnectionDescriptor("input", "int", "",
  391.                                     "%name%.setBevelStyle(%arg%);",
  392.                                     conn.getString("setBevelStyle"));
  393.             connections.addElement(connection);
  394.  
  395.             setBevelStyle.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  396.             md.addElement(setBevelStyle);
  397.         } catch (Exception e) { throw new Error("setBevelStyle:: " + e.toString()); }
  398.  
  399.         try{
  400.             args = new Class[1];
  401.             args[0] = java.lang.Integer.TYPE ;
  402.             MethodDescriptor setPaddingBottom = new MethodDescriptor(beanClass.getMethod("setPaddingBottom", args));
  403.  
  404.             connections = new java.util.Vector();
  405.             connection = new ConnectionDescriptor("input", "int", "",
  406.                                     "%name%.setPaddingBottom(%arg%);",
  407.                                     conn.getString("setPaddingBottom"));
  408.             connections.addElement(connection);
  409.  
  410.             setPaddingBottom.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  411.             md.addElement(setPaddingBottom);
  412.         } catch (Exception e) { throw new Error("setPaddingBottom:: " + e.toString()); }
  413.  
  414.         try{
  415.             args = null;
  416.             MethodDescriptor getLabelColor = new MethodDescriptor(beanClass.getMethod("getLabelColor", args));
  417.  
  418.             connections = new java.util.Vector();
  419.             connection = new ConnectionDescriptor("output", "Color", "",
  420.                                     "%name%.getLabelColor()",
  421.                                     conn.getString("getLabelColor"));
  422.             connections.addElement(connection);
  423.  
  424.             getLabelColor.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  425.             md.addElement(getLabelColor);
  426.         } catch (Exception e) { throw new Error("getLabelColor:: " + e.toString()); }
  427.  
  428.         try{
  429.             args = new Class[1];
  430.             args[0] = java.lang.Integer.TYPE ;
  431.             MethodDescriptor setIPadBottom = new MethodDescriptor(beanClass.getMethod("setIPadBottom", args));
  432.  
  433.             connections = new java.util.Vector();
  434.             connection = new ConnectionDescriptor("input", "int", "",
  435.                                     "%name%.setIPadBottom(%arg%);",
  436.                                     conn.getString("setIPadBottom"));
  437.             connections.addElement(connection);
  438.  
  439.             setIPadBottom.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  440.             md.addElement(setIPadBottom);
  441.         } catch (Exception e) { throw new Error("setIPadBottom:: " + e.toString()); }
  442.  
  443.         try{
  444.             args = null;
  445.             MethodDescriptor getPaddingTop = new MethodDescriptor(beanClass.getMethod("getPaddingTop", args));
  446.  
  447.             connections = new java.util.Vector();
  448.             connection = new ConnectionDescriptor("output", "int", "",
  449.                                     "%name%.getPaddingTop()",
  450.                                     conn.getString("getPaddingTop"));
  451.             connections.addElement(connection);
  452.  
  453.             getPaddingTop.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  454.             md.addElement(getPaddingTop);
  455.         } catch (Exception e) { throw new Error("getPaddingTop:: " + e.toString()); }
  456.  
  457.         try{
  458.             args = null;
  459.             MethodDescriptor getAlignStyle = new MethodDescriptor(beanClass.getMethod("getAlignStyle", args));
  460.  
  461.             connections = new java.util.Vector();
  462.             connection = new ConnectionDescriptor("output", "int", "",
  463.                                     "%name%.getAlignStyle()",
  464.                                     conn.getString("getAlignStyle"));
  465.             connections.addElement(connection);
  466.  
  467.             getAlignStyle.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  468.             md.addElement(getAlignStyle);
  469.         } catch (Exception e) { throw new Error("getAlignStyle:: " + e.toString()); }
  470.  
  471.         MethodDescriptor[] rv = new MethodDescriptor[md.size()];
  472.         md.copyInto(rv);
  473.  
  474.         return rv;
  475.     }
  476.  
  477.     /**
  478.      * Returns descriptions of this bean's properties.
  479.      */
  480.     public PropertyDescriptor[] getPropertyDescriptors() {
  481.         ResourceBundle prop = ResourceBundle.getBundle("symantec.itools.resources.PropBundle");
  482.  
  483.         try{
  484.         PropertyDescriptor defProperty = new PropertyDescriptor("label", beanClass);
  485.         defProperty.setBound(true);
  486.         defProperty.setConstrained(true);
  487.         defProperty.setDisplayName(prop.getString("Label"));
  488.  
  489.         PropertyDescriptor labelColor = new PropertyDescriptor("labelColor", beanClass);
  490.         labelColor.setBound(true);
  491.         labelColor.setConstrained(true);
  492.         labelColor.setDisplayName(prop.getString("LabelColor"));
  493.  
  494.         PropertyDescriptor alignStyle = new PropertyDescriptor("alignStyle", beanClass);
  495.         alignStyle.setBound(true);
  496.         alignStyle.setConstrained(true);
  497.         alignStyle.setDisplayName(prop.getString("LabelAlignment"));
  498.         alignStyle.setValue("ENUMERATION", "ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT");
  499.  
  500.         PropertyDescriptor paddingTop = new PropertyDescriptor("paddingTop", beanClass);
  501.         paddingTop.setBound(true);
  502.         paddingTop.setConstrained(true);
  503.         paddingTop.setDisplayName(prop.getString("PaddingTop"));
  504.  
  505.         PropertyDescriptor paddingBottom = new PropertyDescriptor("paddingBottom", beanClass);
  506.         paddingBottom.setBound(true);
  507.         paddingBottom.setConstrained(true);
  508.         paddingBottom.setDisplayName(prop.getString("PaddingBottom"));
  509.  
  510.         PropertyDescriptor paddingLeft = new PropertyDescriptor("paddingLeft", beanClass);
  511.         paddingLeft.setBound(true);
  512.         paddingLeft.setConstrained(true);
  513.         paddingLeft.setDisplayName(prop.getString("PaddingLeft"));
  514.  
  515.         PropertyDescriptor paddingRight = new PropertyDescriptor("paddingRight", beanClass);
  516.         paddingRight.setBound(true);
  517.         paddingRight.setConstrained(true);
  518.         paddingRight.setDisplayName(prop.getString("PaddingRight"));
  519.  
  520.         PropertyDescriptor iPadTop = new PropertyDescriptor("iPadTop", beanClass);
  521.         iPadTop.setBound(true);
  522.         iPadTop.setConstrained(true);
  523.         iPadTop.setDisplayName(prop.getString("InsetPaddingTop"));
  524.  
  525.         PropertyDescriptor iPadBottom = new PropertyDescriptor("iPadBottom", beanClass);
  526.         iPadBottom.setBound(true);
  527.         iPadBottom.setConstrained(true);
  528.         iPadBottom.setDisplayName(prop.getString("InsetPaddingBottom"));
  529.  
  530.         PropertyDescriptor iPadSides = new PropertyDescriptor("iPadSides", beanClass);
  531.         iPadSides.setBound(true);
  532.         iPadSides.setConstrained(true);
  533.         iPadSides.setDisplayName(prop.getString("InsetPaddingSides"));
  534.  
  535.         PropertyDescriptor borderColor = new PropertyDescriptor("borderColor", beanClass);
  536.         borderColor.setBound(true);
  537.         borderColor.setConstrained(true);
  538.         borderColor.setDisplayName(prop.getString("BorderColor"));
  539.  
  540.         PropertyDescriptor bevelStyle = new PropertyDescriptor("bevelStyle", beanClass);
  541.         bevelStyle.setBound(true);
  542.         bevelStyle.setConstrained(true);
  543.         bevelStyle.setDisplayName(prop.getString("style"));
  544.         bevelStyle.setValue("ENUMERATION", "BEVEL_LOWERED=0, BEVEL_RAISED=1, BEVEL_LINE=2, BEVEL_NONE=3");
  545.  
  546.         PropertyDescriptor[] rv = {
  547.             defProperty,
  548.             labelColor,
  549.             alignStyle,
  550.             paddingTop,
  551.             paddingBottom,
  552.             paddingLeft,
  553.             paddingRight,
  554.             iPadTop,
  555.             iPadBottom,
  556.             iPadSides,
  557.             borderColor,
  558.             bevelStyle};
  559.         return rv;
  560.         } catch (IntrospectionException e) { throw new Error(e.toString()); }
  561.     }
  562.  
  563.     /**
  564.      * Returns the index of the property expected to be changed most often by the designer.
  565.      */
  566.     public int getDefaultPropertyIndex() {
  567.         return 0;    //  the index for our default property is always 0
  568.     }
  569.  
  570.     private final static Class beanClass = BorderPanel.class;
  571.  
  572.     }    //  end of class BorderPanelBeanInfo